Integrand size = 27, antiderivative size = 168 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=-\frac {\left (a C e^2-c \left (C d^2+e (2 B d+A e)\right )\right ) x}{c^2}+\frac {e (2 C d+B e) x^2}{2 c}+\frac {C e^2 x^3}{3 c}+\frac {\left (A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )\right ) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {\left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) \log \left (a+c x^2\right )}{2 c^2} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1643, 649, 211, 266} \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\frac {\arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (2 B e+C d)\right )\right )}{\sqrt {a} c^{5/2}}+\frac {\log \left (a+c x^2\right ) \left (-a B e^2-2 a C d e+2 A c d e+B c d^2\right )}{2 c^2}+\frac {x \left (-a C e^2+c e (A e+2 B d)+c C d^2\right )}{c^2}+\frac {e x^2 (B e+2 C d)}{2 c}+\frac {C e^2 x^3}{3 c} \]
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 1643
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {c C d^2-a C e^2+c e (2 B d+A e)}{c^2}+\frac {e (2 C d+B e) x}{c}+\frac {C e^2 x^2}{c}+\frac {A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )+c \left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) x}{c^2 \left (a+c x^2\right )}\right ) \, dx \\ & = \frac {\left (c C d^2-a C e^2+c e (2 B d+A e)\right ) x}{c^2}+\frac {e (2 C d+B e) x^2}{2 c}+\frac {C e^2 x^3}{3 c}+\frac {\int \frac {A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )+c \left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) x}{a+c x^2} \, dx}{c^2} \\ & = \frac {\left (c C d^2-a C e^2+c e (2 B d+A e)\right ) x}{c^2}+\frac {e (2 C d+B e) x^2}{2 c}+\frac {C e^2 x^3}{3 c}+\frac {\left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) \int \frac {x}{a+c x^2} \, dx}{c}+\frac {\left (A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )\right ) \int \frac {1}{a+c x^2} \, dx}{c^2} \\ & = \frac {\left (c C d^2-a C e^2+c e (2 B d+A e)\right ) x}{c^2}+\frac {e (2 C d+B e) x^2}{2 c}+\frac {C e^2 x^3}{3 c}+\frac {\left (A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {\left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) \log \left (a+c x^2\right )}{2 c^2} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.92 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\frac {\left (A c \left (c d^2-a e^2\right )+a \left (a C e^2-c d (C d+2 B e)\right )\right ) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {x \left (-6 a C e^2+3 c e (4 B d+2 A e+B e x)+2 c C \left (3 d^2+3 d e x+e^2 x^2\right )\right )+3 \left (B c d^2+2 A c d e-2 a C d e-a B e^2\right ) \log \left (a+c x^2\right )}{6 c^2} \]
[In]
[Out]
Time = 0.65 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.01
method | result | size |
default | \(\frac {\frac {1}{3} c C \,x^{3} e^{2}+\frac {1}{2} B c \,e^{2} x^{2}+C c d e \,x^{2}+A c \,e^{2} x +2 B c d e x -a C \,e^{2} x +C c \,d^{2} x}{c^{2}}+\frac {\frac {\left (2 A \,c^{2} d e -B \,e^{2} a c +B \,c^{2} d^{2}-2 a c d e C \right ) \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {\left (-A a c \,e^{2}+A \,c^{2} d^{2}-2 B a c d e +a^{2} C \,e^{2}-C a c \,d^{2}\right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{c^{2}}\) | \(169\) |
risch | \(\text {Expression too large to display}\) | \(1241\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 404, normalized size of antiderivative = 2.40 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\left [\frac {2 \, C a c^{2} e^{2} x^{3} + 3 \, {\left (2 \, C a c^{2} d e + B a c^{2} e^{2}\right )} x^{2} - 3 \, {\left (2 \, B a c d e + {\left (C a c - A c^{2}\right )} d^{2} - {\left (C a^{2} - A a c\right )} e^{2}\right )} \sqrt {-a c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) + 6 \, {\left (C a c^{2} d^{2} + 2 \, B a c^{2} d e - {\left (C a^{2} c - A a c^{2}\right )} e^{2}\right )} x + 3 \, {\left (B a c^{2} d^{2} - B a^{2} c e^{2} - 2 \, {\left (C a^{2} c - A a c^{2}\right )} d e\right )} \log \left (c x^{2} + a\right )}{6 \, a c^{3}}, \frac {2 \, C a c^{2} e^{2} x^{3} + 3 \, {\left (2 \, C a c^{2} d e + B a c^{2} e^{2}\right )} x^{2} - 6 \, {\left (2 \, B a c d e + {\left (C a c - A c^{2}\right )} d^{2} - {\left (C a^{2} - A a c\right )} e^{2}\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) + 6 \, {\left (C a c^{2} d^{2} + 2 \, B a c^{2} d e - {\left (C a^{2} c - A a c^{2}\right )} e^{2}\right )} x + 3 \, {\left (B a c^{2} d^{2} - B a^{2} c e^{2} - 2 \, {\left (C a^{2} c - A a c^{2}\right )} d e\right )} \log \left (c x^{2} + a\right )}{6 \, a c^{3}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 638 vs. \(2 (156) = 312\).
Time = 1.39 (sec) , antiderivative size = 638, normalized size of antiderivative = 3.80 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\frac {C e^{2} x^{3}}{3 c} + x^{2} \left (\frac {B e^{2}}{2 c} + \frac {C d e}{c}\right ) + x \left (\frac {A e^{2}}{c} + \frac {2 B d e}{c} - \frac {C a e^{2}}{c^{2}} + \frac {C d^{2}}{c}\right ) + \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2} + 2 C a d e}{2 c^{2}} - \frac {\sqrt {- a c^{5}} \left (- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}\right )}{2 a c^{5}}\right ) \log {\left (x + \frac {- 2 A a c d e + B a^{2} e^{2} - B a c d^{2} + 2 C a^{2} d e + 2 a c^{2} \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2} + 2 C a d e}{2 c^{2}} - \frac {\sqrt {- a c^{5}} \left (- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}\right )}{2 a c^{5}}\right )}{- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}} \right )} + \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2} + 2 C a d e}{2 c^{2}} + \frac {\sqrt {- a c^{5}} \left (- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}\right )}{2 a c^{5}}\right ) \log {\left (x + \frac {- 2 A a c d e + B a^{2} e^{2} - B a c d^{2} + 2 C a^{2} d e + 2 a c^{2} \left (- \frac {- 2 A c d e + B a e^{2} - B c d^{2} + 2 C a d e}{2 c^{2}} + \frac {\sqrt {- a c^{5}} \left (- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}\right )}{2 a c^{5}}\right )}{- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e + C a^{2} e^{2} - C a c d^{2}} \right )} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.96 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\frac {{\left (B c d^{2} - B a e^{2} - 2 \, {\left (C a - A c\right )} d e\right )} \log \left (c x^{2} + a\right )}{2 \, c^{2}} - \frac {{\left (2 \, B a c d e + {\left (C a c - A c^{2}\right )} d^{2} - {\left (C a^{2} - A a c\right )} e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c^{2}} + \frac {2 \, C c e^{2} x^{3} + 3 \, {\left (2 \, C c d e + B c e^{2}\right )} x^{2} + 6 \, {\left (C c d^{2} + 2 \, B c d e - {\left (C a - A c\right )} e^{2}\right )} x}{6 \, c^{2}} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.06 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=\frac {{\left (B c d^{2} - 2 \, C a d e + 2 \, A c d e - B a e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, c^{2}} - \frac {{\left (C a c d^{2} - A c^{2} d^{2} + 2 \, B a c d e - C a^{2} e^{2} + A a c e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c^{2}} + \frac {2 \, C c^{2} e^{2} x^{3} + 6 \, C c^{2} d e x^{2} + 3 \, B c^{2} e^{2} x^{2} + 6 \, C c^{2} d^{2} x + 12 \, B c^{2} d e x - 6 \, C a c e^{2} x + 6 \, A c^{2} e^{2} x}{6 \, c^{3}} \]
[In]
[Out]
Time = 12.92 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.08 \[ \int \frac {(d+e x)^2 \left (A+B x+C x^2\right )}{a+c x^2} \, dx=x\,\left (\frac {C\,d^2+2\,B\,d\,e+A\,e^2}{c}-\frac {C\,a\,e^2}{c^2}\right )+\frac {x^2\,\left (B\,e^2+2\,C\,d\,e\right )}{2\,c}+\frac {C\,e^2\,x^3}{3\,c}-\frac {\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )\,\left (-C\,a^2\,e^2+C\,a\,c\,d^2+2\,B\,a\,c\,d\,e+A\,a\,c\,e^2-A\,c^2\,d^2\right )}{\sqrt {a}\,c^{5/2}}+\frac {\ln \left (c\,x^2+a\right )\,\left (-8\,C\,a^2\,c^3\,d\,e-4\,B\,a^2\,c^3\,e^2+4\,B\,a\,c^4\,d^2+8\,A\,a\,c^4\,d\,e\right )}{8\,a\,c^5} \]
[In]
[Out]